home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ED-157 / save_window.c < prev    next >
C/C++ Source or Header  |  1993-09-10  |  2KB  |  48 lines

  1. /*
  2.  * Copyright (C) 1992 by Rush Record (rhr@clio.rice.edu)
  3.  * 
  4.  * This file is part of ED.
  5.  * 
  6.  * ED is free software; you can redistribute it and/or modify it under the terms
  7.  * of the GNU General Public License as published by the Free Software Foundation.
  8.  * 
  9.  * ED is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  10.  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11.  * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  12.  * 
  13.  * You should have received a copy of the GNU General Public License along with ED
  14.  * (see the file COPYING).  If not, write to the Free Software Foundation, 675
  15.  * Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17. #include "opsys.h"
  18.  
  19. #include "rec.h"
  20. #include "window.h"
  21. #include "ed_dec.h"
  22.  
  23. /******************************************************************************\
  24. |Routine: save_window
  25. |Callby: bigger_win command edit insert_win new_window remove_win smaller_win wincom
  26. |Purpose: Saves the current window parameters in the window database.
  27. |Arguments:
  28. |    none
  29. \******************************************************************************/
  30. void save_window()
  31. {
  32.     if(CURWINDOW < 0)
  33.         return;
  34.     WINDOW[CURWINDOW].currec = CURREC;
  35.     WINDOW[CURWINDOW].toprec = TOPREC;
  36.     WINDOW[CURWINDOW].botrec = BOTREC;
  37.     WINDOW[CURWINDOW].curbyt = CURBYT;
  38.     WINDOW[CURWINDOW].toprow = TOPROW;
  39.     WINDOW[CURWINDOW].botrow = BOTROW;
  40.     WINDOW[CURWINDOW].toplim = TOPLIM;
  41.     WINDOW[CURWINDOW].botlim = BOTLIM;
  42.     WINDOW[CURWINDOW].currow = CURROW;
  43.     WINDOW[CURWINDOW].curcol = CURCOL;
  44.     WINDOW[CURWINDOW].firstcol = FIRSTCOL;
  45.     WINDOW[CURWINDOW].wantcol = WANTCOL;
  46. }
  47.  
  48.